Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add hash_public_values #730

Merged
merged 9 commits into from
May 14, 2024
Merged

Conversation

ratankaliani
Copy link
Member

@ratankaliani ratankaliani commented May 14, 2024

Add hash_public_values to core to mirror the implementation of hashPublicValues in the Solidity verifier. This will be useful in #729, where we'll add proof verification.

@ratankaliani ratankaliani changed the base branch from main to dev May 14, 2024 01:19
@ratankaliani ratankaliani mentioned this pull request May 14, 2024
2 tasks
core/src/io.rs Outdated Show resolved Hide resolved
@ratankaliani ratankaliani marked this pull request as ready for review May 14, 2024 01:51
core/src/io.rs Outdated
@@ -127,6 +129,26 @@ impl SP1PublicValues {
pub fn write_slice(&mut self, slice: &[u8]) {
self.buffer.write_slice(slice);
}

/// Hash the public values, mask the top 3 bits and return a BigUint.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: comment doens't seem to span 100 columns?

@ratankaliani ratankaliani added this pull request to the merge queue May 14, 2024
Merged via the queue into dev with commit a7d94c2 May 14, 2024
5 checks passed
@ratankaliani ratankaliani deleted the ratan/add-hash-public-values branch May 14, 2024 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants